import type LogicFlow from "@logicflow/core";
import { type FieldColumnsConfig } from "@/api/strategy/strategy-index-database";
// import { type ExmaineSqlResponse } from "@/api/strategy/strategyManage";
import {
  type IndciatorDimension,
  type IndciatorTimePeriodListResponse,
} from "@/api/themeTable/index";

export interface ILogicFlowNodePanelItem {
  type: string;
  text: string;
}

export type nodeProperty = {
  labelColor: string;
  approveTypeLabel: string;
  approveType: string;
};

/**
 * @description 设置类型
 */
export type SettingType =
  | "all"
  | "table_input" //表输入
  | "sql_input" //sql输入
  | "left_join" //左连接
  | "right_join" //右连接
  | "inner_join" //内连接
  | "full_join" //全连接
  | "indicator_output" //指标输出
  | "indicator" //指标
  | "add_operate" //加
  | "cut_operate" // 减
  | "multiply_operate" //乘
  | "except_operate" //除
  | "greaterThan_operate" //大于
  | "greaterThanOrEqual_operate" //大于或等于
  | "lessThan_operate" //小于
  | "lessThanOrEqual_operate" //小于或等于
  | "indicatorConfig_operate"; // 新指标配置
// | "dashedLine"; //虚线

export interface MyLogicFlowPropertiesType extends LogicFlow.PropertiesType {
  aggregationMethod?: string; //聚合方式
  privateDimensionList?: IndciatorDimension[];
  publicDimensionList?: IndciatorDimension[];
  timePeriodTableData?: IndciatorTimePeriodListResponse[];
  tableData?: FieldColumnsConfig[]; //表结构信息
  indicatorOutputData?: FieldColumnsConfig[];
  relatedFieldsOptions1?: FieldColumnsConfig[];
  relatedFieldsOptions2?: FieldColumnsConfig[];
  related_fields1?: string[]; // 关联字段1
  related_fields2?: string[]; // 关联字段1
  relatedFieldsRows?: [];
  tableName?: string; //源表名称
  sqlContent?: string; //sql内容
  selectedDimensionIds?: number[]; //选择的公有维度id集合
  selectedTimeIds?: number[]; // 选择的数据期列id集合
  selectedPrivateDimensionIds?: number[]; //选择的私有维度
  newTableName?: string; // 新指标表名称
  exmaineSql?: string; //存放sql语句
}
